﻿using System;

namespace HomeWork2
{
    class Program
    {
        public delegate void TickHandler(object sender, TickEventArgs args);
        public delegate void AlarmHandler(object sender, AlarmEventArgs args);
        public class TickEventArgs{}
        public class AlarmEventArgs{}

        public class Clock
        {
            public event TickHandler onTick;
            public event AlarmHandler onAlarm;

            public void Tick()
            {
                Console.WriteLine("Clock tick");
                TickEventArgs args1 = new TickEventArgs() { };
                onTick(this, args1);
            }
            public void Alarm()
            {
                Console.WriteLine("Clock alarm");
                AlarmEventArgs args2 = new AlarmEventArgs() { };
                onAlarm(this, args2);
            }
        }
        static void Main(string[] args)
        {
            Clock clock = new Clock();
            clock.Tick();
            clock.Alarm();
        }
    }
}
